extends "../lingbo-2/lingbo-2.gd"


func _extInit():
	._extInit()
	chaName = "「驱逐」绫波"   #角色的名称
	attInfox.spd += 0.3
	lv = 3             #等级的设置
	if id == "lingbo-3":
		addSkill("每炮击3次，对当前目标一列的所有敌人附加8层<漏水><烧蚀>", "斩舰刀")
	else:
		addSkill("每炮击3次，对当前目标一列的所有敌人附加8层<漏水><烧蚀>，每触发3次，发动鬼神演舞", "斩舰刀")

var zjdIndex = 0

func _onNormalAtk(cha):
	._onNormalAtk(cha)
	zjdIndex += 1
	if zjdIndex >= 3 and aiCha != null:
		zjdIndex = 0
		zjd()

var gsywIndex = 0
func zjd():
	gsywIndex += 1
	for i in range(6):
		var cha = matCha(Vector2(aiCha.cell.x, i))
		if cha != null and cha.team != team:
			cha.addBuff(buff.b_shaoShi.new(8))
			buff.addLouShui(cha, self, 8)

	if lv == 4 and gsywIndex >= 3:
		gsywIndex = 0
		call("gsyw")
		
func _onBattleEnd():
	._onBattleEnd()
	zjdIndex = 0
	gsywIndex = 0

